package Practice11;

import java.util.HashSet;

public class HashSetDemo2 {
    public static void main(String[] args) {
        HashSet<Student> sSet = new HashSet<Student>();

        Student stu = new Student("于谦",23);
        sSet.add(stu);
        sSet.add(new Student("郭德纲" ,12));
        sSet.add(stu);

        for (Student s:sSet
             ) {
            System.out.println(s);
        };
    }
}
